/**
*文件用途说明：com_ui_XcountdownTimer 倒计时
*作者：徐国南
*制作日期： 2013-5-10
**/
function showtime() {   
	"use strict";
	var Today = new Date(),  
		year = Today.getFullYear(),
		NowHour = Today.getHours(),   
		NowMinute = Today.getMinutes(),   
		NowMonth = Today.getMonth(),  
		NowDate = Today.getDate(),  
		NowYear = Today.getYear(),  
		NowSecond = Today.getSeconds(),  
		
		Hourleft,
		Minuteleft,
		Secondleft,
		Yearleft,
		Monthleft,
		Dateleft,
		Temp,
		timerID,
		timerRunning;
		
		document.getElementById("next_yeat").innerHTML = year + 1;
		
	if (NowYear <2000){
			NowYear=1900+NowYear;   
			Today = null;   
			Hourleft = 23 - NowHour;
			Minuteleft = 59 - NowMinute;
			Secondleft = 59 - NowSecond;
			Yearleft = year - NowYear; 
			Monthleft = 12 - NowMonth - 1;
			Dateleft = 31 - NowDate;
	}
	if (Secondleft<0)
	{
		Secondleft=60+Secondleft;
		Minuteleft=Minuteleft-1;
	}   
	if (Minuteleft<0)
	{
		Minuteleft=60+Minuteleft;   
		Hourleft=Hourleft-1;   
	}   
	if (Hourleft<0)   
	{   
		Hourleft=24+Hourleft;   
		Dateleft=Dateleft-1;   
	}   
	if (Dateleft<0)   
	{   
		Dateleft=31+Dateleft;   
		Monthleft=Monthleft-1;   
	}   
	if (Monthleft<0)   
	{   
		Monthleft=12+Monthleft;   
		Yearleft=Yearleft-1;   
	}   
	Temp=Yearleft+'年, '+Monthleft+'月, '+Dateleft+'天, '+Hourleft+'小时, '+Minuteleft+'分, '+Secondleft+'秒';
	document.form1.left.value=Temp;   
	timerID = setTimeout(showtime,1000);   
	timerRunning = true;   
}   

var timerID = null;   
var timerRunning = false;   
function stopclock () {   
	"use strict";
	if(timerRunning){
		clearTimeout(timerID);
		timerRunning = false;   
	}
}
function startclock (){   
	"use strict";
	stopclock();
	showtime();
}

startclock();
//var timerID = null;   
//var timerRunning = false; 


